// This extra import allows any variables that are created via functions to work when loaded into JS
@import '../functions/index';

// Core
$euiColorPrimary: #006BB4 !default;
$euiColorSecondary: #017D73 !default;
$euiColorAccent: #DD0A73 !default;
$euiColorHighlight: #FFFCDD !default;

// These colors stay the same no matter the theme
$euiColorGhost: #FFF !default;
$euiColorInk: #000 !default;

// Status
$euiColorSuccess: $euiColorSecondary !default;
$euiColorDanger: #BD271E !default;
$euiColorWarning: #F5A700 !default;

// Grays
$euiColorEmptyShade: #FFF !default;
$euiColorLightestShade: #F5F7FA !default;
$euiColorLightShade: #D3DAE6 !default;
$euiColorMediumShade: #98A2B3 !default;
$euiColorDarkShade: #69707D !default;
$euiColorDarkestShade: #343741 !default;
$euiColorFullShade: #000 !default;

// Every color below must be based mathmatically on the set above and in a particular order.
$euiTextColor: $euiColorDarkestShade !default;
$euiPageBackgroundColor: tintOrShade($euiColorLightestShade, 50%, 30%) !default;
$euiTextSubduedColor: makeHighContrastColor($euiColorMediumShade) !default;
$euiTitleColor: shadeOrTint($euiTextColor, 50%, 0%) !default;
$euiLinkColor: $euiColorPrimary !default;
$euiFocusBackgroundColor: tintOrShade($euiColorPrimary, 90%, 50%) !default;

// Contrasty text variants
$euiColorPrimaryText: makeHighContrastColor($euiColorPrimary) !default;
$euiColorSecondaryText: makeHighContrastColor($euiColorSecondary) !default;
$euiColorAccentText: makeHighContrastColor($euiColorAccent) !default;
$euiColorWarningText: makeHighContrastColor($euiColorWarning) !default;
$euiColorDangerText: makeHighContrastColor($euiColorDanger) !default;
$euiColorSuccessText: $euiColorSecondaryText !default;

// Visualization colors

// Maps allow for easier JSON usage
// Use map_merge($euiColorVisColors, $yourMap) to change individual colors after importing ths file
// The `behindText` variant is a direct copy of the hex output by the JS euiPaletteColorBlindBehindText() function
$euiPaletteColorBlind: (
  euiColorVis0: (
    graphic: #54B399,
    behindText: #6DCCB1,
  ),
  euiColorVis1: (
    graphic: #6092C0,
    behindText: #79AAD9,
  ),
  euiColorVis2: (
    graphic: #D36086,
    behindText: #EE789D,
  ),
  euiColorVis3: (
    graphic: #9170B8,
    behindText: #A987D1,
  ),
  euiColorVis4: (
    graphic: #CA8EAE,
    behindText: #E4A6C7,
  ),
  euiColorVis5: (
    graphic: #D6BF57,
    behindText: #F1D86F,
  ),
  euiColorVis6: (
    graphic: #B9A888,
    behindText: #D2C0A0,
  ),
  euiColorVis7: (
    graphic: #DA8B45,
    behindText: #F5A35C,
  ),
  euiColorVis8: (
    graphic: #AA6556,
    behindText: #C47C6C,
  ),
  euiColorVis9: (
    graphic: #E7664C,
    behindText: #FF7E62,
  )
) !default;

$euiPaletteColorBlindKeys: map-keys($euiPaletteColorBlind);

$euiColorVis0: map-get(map-get($euiPaletteColorBlind, 'euiColorVis0'), 'graphic') !default;
$euiColorVis1: map-get(map-get($euiPaletteColorBlind, 'euiColorVis1'), 'graphic') !default;
$euiColorVis2: map-get(map-get($euiPaletteColorBlind, 'euiColorVis2'), 'graphic') !default;
$euiColorVis3: map-get(map-get($euiPaletteColorBlind, 'euiColorVis3'), 'graphic') !default;
$euiColorVis4: map-get(map-get($euiPaletteColorBlind, 'euiColorVis4'), 'graphic') !default;
$euiColorVis5: map-get(map-get($euiPaletteColorBlind, 'euiColorVis5'), 'graphic') !default;
$euiColorVis6: map-get(map-get($euiPaletteColorBlind, 'euiColorVis6'), 'graphic') !default;
$euiColorVis7: map-get(map-get($euiPaletteColorBlind, 'euiColorVis7'), 'graphic') !default;
$euiColorVis8: map-get(map-get($euiPaletteColorBlind, 'euiColorVis8'), 'graphic') !default;
$euiColorVis9: map-get(map-get($euiPaletteColorBlind, 'euiColorVis9'), 'graphic') !default;

// sass-lint:disable-block variable-name-format
$euiColorVis0_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis0'), 'behindText') !default;
$euiColorVis1_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis1'), 'behindText') !default;
$euiColorVis2_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis2'), 'behindText') !default;
$euiColorVis3_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis3'), 'behindText') !default;
$euiColorVis4_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis4'), 'behindText') !default;
$euiColorVis5_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis5'), 'behindText') !default;
$euiColorVis6_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis6'), 'behindText') !default;
$euiColorVis7_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis7'), 'behindText') !default;
$euiColorVis8_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis8'), 'behindText') !default;
$euiColorVis9_behindText: map-get(map-get($euiPaletteColorBlind, 'euiColorVis9'), 'behindText') !default;

// Charts
$euiColorChartLines: shade($euiColorLightestShade, 3%) !default;
$euiColorChartBand: $euiColorLightestShade !default;


// Code
$euiCodeBlockBackgroundColor: $euiColorLightestShade !default;
$euiCodeBlockColor: makeHighContrastColor($euiTextColor, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockSelectedBackgroundColor: inherit !default;
$euiCodeBlockCommentColor: makeHighContrastColor($euiTextSubduedColor, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockSelectorTagColor: inherit !default;
$euiCodeBlockStringColor: makeHighContrastColor($euiColorVis2, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockTagColor: makeHighContrastColor($euiColorVis1, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockNameColor: makeHighContrastColor($euiColorVis1, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockNumberColor: makeHighContrastColor($euiColorVis0, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockKeywordColor: makeHighContrastColor($euiColorVis3, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockFunctionTitleColor: inherit !default;
$euiCodeBlockTypeColor: makeHighContrastColor($euiColorVis1, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockAttributeColor: inherit !default;
$euiCodeBlockSymbolColor: makeHighContrastColor($euiColorVis9, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockParamsColor: inherit !default;
$euiCodeBlockMetaColor:  makeHighContrastColor($euiTextSubduedColor, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockTitleColor: makeHighContrastColor($euiColorVis7, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockSectionColor: makeHighContrastColor($euiColorVis9, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockAdditionColor: makeHighContrastColor($euiColorVis0, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockDeletionColor: makeHighContrastColor($euiColorDanger, $euiCodeBlockBackgroundColor) !default;
$euiCodeBlockSelectorClassColor: inherit !default;
$euiCodeBlockSelectorIdColor: inherit !default;
